<% if search_fields.count > 0 %>
<div class="row">
  <div class="span9 well">
  <%= search_form_for [:admin,@search], :as => :rquery do |f| %>
    <div class="controls">
      <label for="search">Search: 
        <div class="input-append">
        <% search_fields.each do |search_field| %>
        <%= f.text_field search_field,class:"span4" %>
        <%= f.submit "Search",class:"btn" %>
        <% end %>
        </div>
      </label>
    </div>
    <% if false %>

      <%= f.condition_fields do |c| %>
        <%= render "condition_fields", f: c %>
      <% end %>
      <p><%= link_to_add_fields "Add Conditions", f, :condition %></p>
      <div class="field">
        Sort:
        <%= f.sort_fields do |s| %>
          <%= s.sort_select %>
        <% end %>
      </div> 
    <% end %>
  <% end %>
  </div>
</div>
<% end %>